var o = "", n = null;
var e, o = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/helpers/defineProperty"));
Page({
  data: {},
  onLoad: function (t) {
    o = this, wx.createInterstitialAd && ((n = wx.createInterstitialAd({
      adUnitId: "adunit-a2c2bdff627f59a1"
    })).onLoad(function () { }), n.onError(function (o) { }), n.onClose(function () { }));
  },
  onReady: function () { },
  onShow: function () { },
  onHide: function () { },
  onUnload: function () { },
  onPullDownRefresh: function () { },
  onReachBottom: function () { },
  onShareAppMessage: function () {
    return {
      title: "王者荣耀重复名·空白名·明星名一键生成",
      path: "/pages/index/index?id=123",
      imageUrl: "/image/zf.jpg"
    };
  },
  checkSec: function (o) {
    var n = this, t = o.detail.value.content;
    console.log(o, t), wx.cloud.callFunction({
      name: "checkContentSec",
      data: {
        content: t
      }
    }).then(function (o) {
      87014 === o.result.checked.errCode && wx.showToast({
        icon: "none",
        title: "包含敏感词，请换一个"
      }), n.setData({
        checkedResult: ""
      });
    });
  },
  cratepwd: function (o) {
    console.log("创建密码开始啦", o);
    var t = o.detail.value.inp, e = t.length;
    if (0 != e) {
      var a = 6 - e, c = Math.floor(Math.random() * a) + e + 1;
      "⁢⁡", console.log("特殊字符", "⁢⁡");
      var l = "⁢⁡".length;
      console.log("特殊字符长度", l);
      var i = "", s = Math.floor(Math.random() * (e + 1)), r = "⁢⁡"[Math.floor(Math.random() * l)];
      if (0 == s) i = r + t, console.log("特殊字符前置", r, "用户输入", t, "最终结果", i); else if (s == e) i = t + r,
        console.log("用户输入", t, "特殊字符后置", r, "最终结果", i); else {
        var u = t.substr(0, s);
        u += r;
        var d = t.substr(s);
        i = u + d, console.log("前边部分和特殊字符在一起", u, "后边部分", d, "最终结果", i);
      }
      for (var h = t = "⁢⁡", f = h.length; i.length < c - 1;) {
        i += h[Math.floor(Math.random() * f)];
      }
      console.log("生成字符的长度", i.length), wx.setClipboardData({
        data: i,
        success: function (o) {
          wx.showToast({
            icon: "none",
            title: "成功生成重复名，直接粘贴到游戏使用"
          });
        }
      }), n && n.show().catch(function (o) {
        console.error(o);
      }), this.setData({
        r: i
      });
    } else wx.showToast({
      title: "您没有输入",
      icon: "loading"
    });
  },
  fuzhi: function (n) {
    console.log("设置到剪贴板"), wx.setClipboardData({
      data: o.data.r,
      success: function (n) {
        wx.showToast({
          title: "复制成功",
          success: function (n) {
            console.log("剪切板数据长度", o.data.r.length);
          }
        });
      },
      fail: function (o) {
        wx.showToast({
          title: "您没有输入",
          icon: "loading"
        });
      }
    });
  },
  data: {},
  onLoad: function (t) {
    n = this, wx.createInterstitialAd && ((o = wx.createInterstitialAd({
      adUnitId: ""
    })).onLoad(function () { }), o.onError(function (o) { }), o.onClose(function () { }));
  },
  onReady: function () { },
  onShow: function () { },
  onHide: function () { },
  onUnload: function () { },
  onPullDownRefresh: function () { },
  onReachBottom: function () { },
  onShareAppMessage: function () {
    return {
      title: "重复名·空白名·融合名一键生成",
      path: "/pages/jc/index?id=1234",
      imageUrl: "/image/zf.jpg"
    };
  },
  checkSec: function (o) {
    var n = this, t = o.detail.value.content;
    console.log(o, t), wx.cloud.callFunction({
      name: "checkContentSec",
      data: {
        content: t
      }
    }).then(function (o) {
      87014 === o.result.checked.errCode && wx.showToast({
        icon: "none",
        title: "包含敏感词，请换一个"
      }), n.setData({
        checkedResult: ""
      });
    });
  },
  cratepwd1: function (n) {
    console.log("创建密码开始啦", n);
    var t = n.detail.value.inp, e = t.length;
    if (0 != e) {
      var a = 6 - e, c = Math.floor(Math.random() * a) + e + 1;
      "̵̣͘", console.log("特殊字符", "̵̣͘");
      var l = "̵̣͘".length;
      console.log("特殊字符长度", l);
      var i = "", s = Math.floor(Math.random() * (e + 1)), r = "̵̣͘"[Math.floor(Math.random() * l)];
      if (0 == s) i = r + t, console.log("特殊字符前置", r, "用户输入", t, "最终结果", i); else if (s == e) i = t + r,
        console.log("用户输入", t, "特殊字符后置", r, "最终结果", i); else {
        var u = t.substr(0, s);
        u += r;
        var h = t.substr(s);
        i = u + h, console.log("前边部分和特殊字符在一起", u, "后边部分", h, "最终结果", i);
      }
      for (var d = t = "̵̣͘", f = d.length; i.length < c - 1;) {
        i += d[Math.floor(Math.random() * f)];
      }
      console.log("生成字符的长度", i.length), wx.setClipboardData({
        data: i,
        success: function (o) {
          wx.showToast({
            icon: "none",
            title: "成功生成融合名，直接粘贴到游戏使用"
          });
        }
      }), o && o.show().catch(function (o) {
        console.error(o);
      }), this.setData({
        r: i
      });
    } else wx.showToast({
      title: "您没有输入",
      icon: "loading"
    });
  },
  fuzhi: function (o) {
    console.log("设置到剪贴板"), wx.setClipboardData({
      data: n.data.r,
      success: function (o) {
        wx.showToast({
          title: "复制成功",
          success: function (o) {
            console.log("剪切板数据长度", n.data.r.length);
          }
        });
      },
      fail: function (o) {
        wx.showToast({
          title: "您没有输入",
          icon: "loading"
        });
      }
    });
  },
data: {},
    createMiMa: function(e) {
        var o = new Date().getTime(), n = wx.getStorageSync("endTime");
        if (n) {
            var t = o - n;
            t > 18e5 ? (console.log("起点时间超过结束时间一天，设置次数为1 并需要重新设置结束时间"), wx.setStorageSync("cishu", 1), 
            n = o + 18e5, wx.setStorageSync("endTime", n)) : console.log("据距离上次使用，不超过规定时间", t, "规定毫秒数", 18e5);
        } else n = o + 18e5, wx.setStorageSync("endTime", n);
        var a = wx.getStorageSync("cishu");
        if ("" == a && wx.setStorageSync("cishu", 1), a - 0 > 7) wx.showToast({
            title: "获取太频繁，请稍后再用",
            icon: "none"
        }); else {
            console.log("起点时间", o, "结束时间", n);
            for (var r = "⁡　⁠⁢   ".length, i = ""; r < 4 || r > 6; ) r = Math.floor(8 * Math.random());
            for (var c = 0; c < r; ++c) {
                i += "⁡　⁠⁢   "[Math.floor(9999999 * Math.random()) % r];
            }
            console.log("随机字符串", i), wx.setClipboardData({
                data: i
            }), wx.setStorageSync("cishu", a - 0 + 1);
        }
    },
onShareAppMessage: function() {
  return {
      title: "[@你] 教你如何修改空白名等",
      path: "/pages/gm/gm"
  };
}
});
